package com.yx.robot.bean.robot;


import java.util.ArrayList;

public class Path implements Clear {

    public long pathID;
    public long mapID;
    public ArrayList<PathPoint> pathPoints = new ArrayList<>();
    public ArrayList<PathPoint> destPathPoints = new ArrayList<>();


    public void clear() {
        pathPoints.clear();
        destPathPoints.clear();
        pathID = -1;
        mapID = -1;
    }


    @Override
    public Object clone() {
        try {
            ArrayList<PathPoint> copyPathPoints = new ArrayList<>();
            copyPathPoints.addAll(destPathPoints);

            Path copyPath = (Path) super.clone();
            copyPath.destPathPoints = copyPathPoints;
            return copyPath;
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return new Path();
    }
}
